Technical Q&As
QD3D 69 - Checking Whether QD3D Is Available (11-July-97)
Q
How do I check in my application whether QuickDraw 3D is available? My application needs to
be able to work even if the QD3D libraries are not loaded.
A
Refer to the section "Initializing and Terminating QuickDraw 3D" on pg. 1-16,
chapter 1 of "
3D Graphics Programming with QD3D".
Basically, you need to "weak" link to the QD3D libraries in your application and
check whether the address of the QD3D functions you need in the library have been
resolved at run-time.
For a good discussion about weak linking see Technote 1083 "
Weak-Linking to a
CFM-based Shared Library". Note: the function MyEnvironmentHsQuickDraw3D
in
listing 1-1 of "3D Graphics Programming with QuickDraw 3D" contains a bug.
Technote 1083 contains the correct code.
-- Scott Kuechle
Worldwide Developer Technical Support
Technical Q&As
Previous Question | Contents |
Next Question
To contact us, please use the Contact Us page.